//package com.wilmer.aliyun;
//
//import cn.hutool.core.io.FileUtil;
//import cn.hutool.core.io.file.FileReader;
//import cn.hutool.core.lang.UUID;
//import cn.hutool.http.HttpUtil;
//import com.qiniu.common.QiniuException;
//import com.wilmer.aliyun.utils.AliyunSSMUtils;
//import com.wilmer.common.annotation.Anonymous;
//import com.wilmer.common.core.domain.AjaxResult;
//import com.wilmer.framework.web.service.TokenService;
//import com.wilmer.qiniuyun.utils.QiNiuOssUtil;
//import com.wilmer.wechatapp.data.mapper.CountryAreaMapper;
//import com.wilmer.wechatapp.utils.AccessTokenUtil;
//import com.wilmer.wechatapp.utils.OpenIdUtil;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//
//@RestController
//public class Test66Controller {
//    @Resource
//    private AliyunSSMUtils aliyunSSMUtils;
//    @Resource
//    private AccessTokenUtil util;
//    @Resource
//    private TokenService tokenService;
//
//    @Resource
//    private CountryAreaMapper countryAreaMapper;
//
//    @Resource
//    private OpenIdUtil openIdUtil;
//    @Autowired
//    private QiNiuOssUtil ossUtil;
//
//
//    private void t1(){
//
//    }
//
//
//    @Anonymous()
//    @GetMapping("/eee")
//    public AjaxResult test() throws QiniuException {
////        LoginUser loginUser=new LoginUser();
////        loginUser.setUserId(9999L);
////
////        String token = tokenService.createToken(loginUser);
////        System.out.println(token);
////        System.out.println(util.getToken());
////
////        LoginBean openId = openIdUtil.getOpenId("0a3CL9000UJbJR19Xz200rxIFC0CL90e");
////        System.out.println(openId+"----");
//////        aliyunSSMUtils.sendMessage("17562789805", "116666") ? true : false
//
//
////        System.out.println(countryAreaMapper.selectCountryArea());
////
////        JSON parse = JSONUtil.parse(countryAreaMapper.selectCountryArea());
//        String fileUrl = "https://lx-static.gximg.cn/logo/1i/1p/HYRXVr6tIYCUb0AX8JFygyTfUNdomtMM.png";
//
////将文件下载后保存在E盘，返回结果为下载文件大小
//        String uuid= String.valueOf(UUID.fastUUID());
//        long size = HttpUtil.downloadFile(fileUrl, FileUtil.file("D:/PIC/"+ uuid+".jpg"));
//        System.out.println("Download size: " + size);
//
//        FileReader fileReader=new FileReader("D:/PIC/"+ uuid+".jpg");
//        byte[] bytes = fileReader.readBytes();
//        String upload = ossUtil.uploadBt(bytes,"jjj.png");
//        System.out.println(upload);
//
//
//
//        return AjaxResult.success() ;
//    }
//}
//
